package com.share.shareplatform.shareorder.service.feign;

import com.share.shareplatform.pojo.Goods;
import com.share.shareplatform.pojo.User;
import com.share.shareplatform.util.Result;
import io.swagger.models.auth.In;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;

import java.io.IOException;
import java.util.Map;

@Component
@FeignClient(value = "share-goods")
public interface GoodsService {


    @GetMapping("/goods/{id}")
    Result findOneById(@PathVariable("id") Long id);

    @GetMapping("/goods/all/map/{ids}")
    Result findAllByIdAsMap(@PathVariable("ids") String ids) ;

    @GetMapping("/goods/all/shop/{id}")
    Result findAllByShopId(@PathVariable("id") Long id);

    @PutMapping("/goods/repertory/{idNumbers}")
    Result updateAllRepertory(@PathVariable("idNumbers") String idNumbers);

}